class FacultiesController < ApplicationController
	
  # GET /faculties
  # GET /faculties.json
  def index
    @faculties = Faculty.all

    respond_to do |format|
      format.html # index.html.erb
      format.json { render json: @faculties, :except => "groups" }
    end
	end
  
  # GET /faculties/1
  # GET /faculties/1.json
  def show
    @faculty = Faculty.joins(:groups).find(params[:id])
    
    respond_to do |format|
      format.html # show.html.erb
      format.json { render json: @faculty }
    end
  end
end
